package com.scenery.view;

import java.util.ArrayList;

import com.scenery.R;
import com.scenery.adapter.CityAdapter;
import com.scenery.adapter.SceneryAdapter;

import com.scenery.util.Loger;
import com.scenery.vo.City;
import com.scenery.vo.Scenery;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;
/***景点列表***/
public class SceneryListView  extends ListView{
	private static final String TAG = SceneryListView.class.getName();
	private SceneryAdapter adapter; 
	private ArrayList<Scenery>  list = new ArrayList<Scenery> ();
	
	public SceneryListView(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
		adapter=new SceneryAdapter(context, R.layout.scenery_list, list); 
		setAdapter(adapter);
		//refresh( );
	}
	
	public void refresh(  ArrayList<Scenery> data){
		Loger.d(TAG, "refresh");
		list.clear();
		for(Scenery bean:data){
			list.add(bean);
		}
		adapter.notifyDataSetChanged();
	}

}
